import request from "@/api/request";
import { type AxiosRequestConfig } from "axios";
import { type DeepRequired } from "../../interface";

/**
 * /project/upload/sign
 */
export function postProjectUploadSign(params: PostProjectUploadSignParams, input?: PostProjectUploadSignInput, config?: AxiosRequestConfig) {
    const paramsInput = {
        id: params.id,
        signTime: params.signTime,
        signAmount: params.signAmount,
        signRemark: params.signRemark,
    };
    return request.post<DeepRequired<any>>(`/project/upload/sign`, input, {
        params: paramsInput,
        ...config,
    });
}

export interface PostProjectUploadSignParams {
    id: number;
    signTime?: string;
    signAmount?: number;
    signRemark?: string;
}

export interface PostProjectUploadSignInput {
    file?: File;
}
